package com.shyroke.daydayzhuanweb.controller;

import cn.hutool.core.collection.CollectionUtil;
import cn.hutool.core.date.DateUnit;
import cn.hutool.core.date.DateUtil;
import com.shyroke.daydayzhuanapi.constant.ProjectConst;
import com.shyroke.daydayzhuanapi.constant.ProjectFromConstant;
import com.shyroke.daydayzhuanapi.dto.*;
import com.shyroke.daydayzhuanapi.entity.*;
import com.shyroke.daydayzhuandao.respository.NewsRepository;
import com.shyroke.daydayzhuandao.respository.ProjectRepository;
import com.shyroke.daydayzhuandao.respository.ProjectSubjectRepository;
import com.shyroke.daydayzhuansvc.service.ICommentService;
import com.shyroke.daydayzhuansvc.service.impl.*;
import com.shyroke.daydayzhuansvc.util.*;
import org.apache.commons.lang3.StringUtils;
import org.apache.http.HttpStatus;
import org.jsoup.Jsoup;
import org.jsoup.nodes.Document;
import org.jsoup.select.Elements;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.servlet.ModelAndView;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.util.Comparator;
import java.util.Date;
import java.util.List;
import java.util.Optional;
import java.util.stream.Collectors;

/**
 * 类名 ：文章的控制层
 * 用法 ：
 * 创建人 ： shyroke
 * 时间：2018/12/5 11:47
 */
@Controller
@RequestMapping(value = "tag")
public class TagController {

    @Autowired
    private LableService LableService;

    private Logger logger = LoggerFactory.getLogger(this.getClass());


    @PostMapping("updateCount")
    @ResponseBody
    public void updateCount(@RequestParam("key")String key){
        LableService.updateCount(key);
    }


}


